.class Lcom/waiqin365/h5/location/c;
.super Ljava/lang/Object;

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field final synthetic a:Lcom/waiqin365/h5/location/a;


# direct methods
.method constructor <init>(Lcom/waiqin365/h5/location/a;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/h5/location/c;->a:Lcom/waiqin365/h5/location/a;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 3

    iget-object v0, p0, Lcom/waiqin365/h5/location/c;->a:Lcom/waiqin365/h5/location/a;

    iget-object v0, v0, Lcom/waiqin365/h5/location/a;->a:Lcom/waiqin365/h5/location/WqLocationBackground;

    invoke-static {v0}, Lcom/waiqin365/h5/location/WqLocationBackground;->f(Lcom/waiqin365/h5/location/WqLocationBackground;)I

    move-result v0

    const/4 v1, 0x2

    if-gt v0, v1, :cond_0

    iget-object v0, p0, Lcom/waiqin365/h5/location/c;->a:Lcom/waiqin365/h5/location/a;

    iget-object v0, v0, Lcom/waiqin365/h5/location/a;->a:Lcom/waiqin365/h5/location/WqLocationBackground;

    invoke-static {v0}, Lcom/waiqin365/h5/location/WqLocationBackground;->d(Lcom/waiqin365/h5/location/WqLocationBackground;)V

    :goto_0
    return-void

    :cond_0
    const-string/jumbo v0, "LocationListener"

    const-string/jumbo v1, "\u8d85\u65f6\u65f6\u95f4"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    iget-object v0, p0, Lcom/waiqin365/h5/location/c;->a:Lcom/waiqin365/h5/location/a;

    iget-object v0, v0, Lcom/waiqin365/h5/location/a;->a:Lcom/waiqin365/h5/location/WqLocationBackground;

    new-instance v1, Lcom/waiqin365/compons/c/f;

    invoke-direct {v1}, Lcom/waiqin365/compons/c/f;-><init>()V

    invoke-static {v0, v1}, Lcom/waiqin365/h5/location/WqLocationBackground;->a(Lcom/waiqin365/h5/location/WqLocationBackground;Lcom/waiqin365/compons/c/f;)Lcom/waiqin365/compons/c/f;

    iget-object v0, p0, Lcom/waiqin365/h5/location/c;->a:Lcom/waiqin365/h5/location/a;

    iget-object v0, v0, Lcom/waiqin365/h5/location/a;->a:Lcom/waiqin365/h5/location/WqLocationBackground;

    invoke-static {v0}, Lcom/waiqin365/h5/location/WqLocationBackground;->b(Lcom/waiqin365/h5/location/WqLocationBackground;)Lcom/waiqin365/compons/c/f;

    move-result-object v0

    invoke-virtual {v0}, Lcom/waiqin365/compons/c/f;->i()Ljava/lang/String;

    move-result-object v0

    :try_start_0
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string/jumbo v0, "locationType"

    const-string/jumbo v2, "1"

    invoke-virtual {v1, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    iget-object v0, p0, Lcom/waiqin365/h5/location/c;->a:Lcom/waiqin365/h5/location/a;

    iget-object v0, v0, Lcom/waiqin365/h5/location/a;->a:Lcom/waiqin365/h5/location/WqLocationBackground;

    invoke-static {v0}, Lcom/waiqin365/h5/location/WqLocationBackground;->c(Lcom/waiqin365/h5/location/WqLocationBackground;)Lorg/apache/cordova/CallbackContext;

    move-result-object v0

    invoke-virtual {v0, v1}, Lorg/apache/cordova/CallbackContext;->success(Lorg/json/JSONObject;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    iget-object v0, p0, Lcom/waiqin365/h5/location/c;->a:Lcom/waiqin365/h5/location/a;

    iget-object v0, v0, Lcom/waiqin365/h5/location/a;->a:Lcom/waiqin365/h5/location/WqLocationBackground;

    invoke-static {v0}, Lcom/waiqin365/h5/location/WqLocationBackground;->c(Lcom/waiqin365/h5/location/WqLocationBackground;)Lorg/apache/cordova/CallbackContext;

    move-result-object v0

    invoke-virtual {v0}, Lorg/apache/cordova/CallbackContext;->success()V

    goto :goto_0
.end method
